#!/bin/bash

SCRIPT_DIR=$(cd `dirname $0` && pwd)
cd $SCRIPT_DIR

rm -rf ./_install

cd dropbear
git reset --hard 

autoconf; autoheader || exit 1

./configure CC=arm-hisiv300-linux-uclibcgnueabi-gcc \
    --prefix=$SCRIPT_DIR/_install \
    USER_CFLAGS="-march=armv5te -mcpu=arm926ej-s -I/opt/arm-hisiv300-linux/target/usr/include -L/opt/arm-hisiv300-linux/target/usr/lib" \
    AR=arm-hisiv300-linux-uclibcgnueabi-ar \
    RANLIB=arm-hisiv300-linux-uclibcgnueabi-ranlib \
    --host=arm \
    --disable-zlib \
    || exit 1

cp ../localoptions.h ./ || exit 1

